﻿<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%>
<%@ page import="java.util.List,org.jbit.bean.*,org.jbit.dao.*,java.util.ArrayList"%>
<%
UserDao UD = new UserDao();
List<DictionaryHelp> listUser=new ArrayList<DictionaryHelp>();
listUser=UD.getUserDictionary();
String user=(String) request.getSession().getAttribute("user");
String ModuleMark=UD.ModuleMarkByUserName(user);
User users=UD.GetInfoByModuleMark(ModuleMark);
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link rel="stylesheet" type="text/css" href="../css/table.css" />
<script type="text/javascript">
$.post("../UserUpdateAction?method=update",
				$("#saveForm").serialize(), function(data) {
					alert(data);
				});
</script>
<link rel="stylesheet" type="text/css" href="../css/button.css" />
    <script language="javascript" type="text/javascript"> 
 setInterval("timer.innerHTML=new Date().toLocaleString()+'&nbsp;&nbsp;星期'+'日一二三四五六'.charAt(new Date().getDay());",1000);      

</script>

</head>
<body>

<div class="header">
<div class="container">
		  <div class="wrapper-demo">
					<div id="dd" class="wrapper-dropdown-5" ><%=(String) request.getSession().getAttribute("user") %>
						<ul id="tags" class="dropdown">
							<li><a href="../User/person.jsp"><i></i>个人中心</a></li>
							<li><a href="../loginByType/User.jsp"><i></i>车辆追踪</a></li>
							<li><a href="../User/carInfo.jsp"><i></i>车辆信息</a></li>
                            <li><a href="../login.jsp"><i class="icon-remove"></i>安全退出</a></li>
						</ul>
					</div>
				</div>
			
		</div>
</div>
<div id="timer" class="timer" align="center"></div>
<div class="tablemain" id="tablemain" align="center">
<form action="../UserUpdateAction?method=updateByUser" method="post">
<input type="hidden" name="ID" id="ID" value="<%=users.getID()%>"/>
<input type="hidden" name="realName" id="realName" value="<%=users.getRealName()%>"/>
<input type="hidden" name="personId" id="personId" value="<%=users.getPersonId()%>"/>
<input type="hidden" name="regitTime" id="regitTime" value="<%=users.getRegitTime()%>"/>
<input type="hidden" name="type" id="type" value="<%=users.getType()%>"/>
<input type="hidden" name="moduleMark" id="moduleMark" value="<%=users.getModuleMark()%>"/>
<input type="hidden" name="moduleMobile" id="moduleMobile" value="<%=users.getModuleMobile()%>"/>
<input type="hidden" name="carId" id="carId" value="<%=users.getCarId()%>"/>
<input type="hidden" name="countyId" id="countyId" value="<%=users.getCountyId()%>"/>
<table width="466" height="142" border="1" align="center">
<%
	String msg = (String) request.getParameter("message");
	if (msg != null && !msg.equals("")) {
	if (msg.equals("success") ) msg="修改成功";
	else if (msg.equals("fail") ) msg="修改失败";
	%>
	<tr>
	<td colspan="2"><div align="center">
	<font color="red" size="2"><%=msg%></font>
	</div></td>
	</tr>
<%}%>
<tr class="main">
  <td height="38" colspan="2"><div align="center">个人信息修改</div></td>
</tr>
<tr>
  <td width="130" height="38">用户名：</td>
<td width="320"><input type="text"	name="userName" id="userName" value="<%=users.getUserName()%>" readonly/></td></tr>
<tr>
  <td height="38">密码：</td>
<td><input type="text"	name="password" id="password" value="<%=users.getPassword()%>" /></td></tr>
<tr>
  <td height="38">联系电话：</td>
<td><input type="text"	name="userMobile" id="userMobile" value="<%=users.getUserMobile()%>" /></td></tr>
<tr><td colspan="2" align="center"><input type="submit" value="确认"/></td></tr>
</table>
</form>
</div>
<!-- jQuery if needed -->
<script type="text/javascript" src="../js/jquery/jquery-1.9.1.js"></script>
<script type="text/javascript">
function DropDown(el) {
this.dd = el;
this.initEvents();
}
DropDown.prototype = {
initEvents : function() {
var obj = this;
obj.dd.on('click', function(event){
$(this).toggleClass('active');
event.stopPropagation();
});
}
};
$(function() {
new DropDown( $('#dd') );
$(document).click(function() {
$('.wrapper-dropdown-5').removeClass('active');
});
});
</script>
</body>
</html>
